#ifndef GROUP_H
#define GROUP_H

#include "socket.h"
#include "thread.h"
#include "lists.h"
#include "user.h"


#define MAX_GROUP_NUM 255
#define MAX_GROUP_MEMBER_NUM 255

struct group
{
    const char* gip;

    const char* name;

    int user_num;

    struct UserTable ut;

    TGAP_LIST_ENTRY(group) field;
};


TGAP_LIST_HEAD_NOLOCK(GroupTable, group);

extern struct UserTable UT;

void CreateGroup(struct user* creator, const char* name);
void PrintGroupTable();

#endif